Creating and Disributing Mods


Overview

A Mod is a user modification for a game, changing or adding to the game's functionality.  To simplify distribution of Mods versions of I-War 2 from 14.6 includes special support for mod zip files.

If you require the F14.6 patch, then please visit the Independence War Website.

 

Mod Zip Files

A mod zip file is a zip archive containing all the files required for a user mod. The mod file uses the same folder structure as the game's standard resources, and when active any files in the mod zip will override identically named files in the game's resources.

See File System for an overview of the game's file system, and its use of zip files.

Mod zip files are placed in the game's mods folder. The game will automatically detect any mods located there and make them available for activation on the Extras screen. This makes it easy to distribute your mod, as your mod is a single file, and no special knowledge is needed to install it.


User Mod Types

There are two types of Mods, mods and scenarios. Mods modify a part of the game, and can be turned on and off. More than one mod can be active at the same time, providing they don't attempt to modify the same resources. Scenarios are self-contained missions or scenarios, and only one can be active at a time.

Note: Mods that contain Pog packages cannot be turned off properly once they have been turned on in the game, as the packages can't unload once they are in-use.  If you turn off a Mod containing a Pog package you must exit the game and restart it to register the change.

 

Putting Together a Mod

Create a folder for your mod. Name it so that it reflects the mod's name, e.g. location_finder, or manual_countermeasures.

Put all the files for your mod in the folder, keeping the same folder structure as the original files.

Use a zip program such as WinZip to turn your folder into a zip file. Make sure that the folder names in your mod are included in the zip file. Also make sure that the folder name of your mod is NOT part of the path name of the files in the mod.

You can optionally create two additional files in that inform the game about the content of your mod. These should be placed in the root folder of the mod zip file.

Mod INI File
This is a small INI File that informs the game of the name of your mod. By default the game uses the name of your mod zip when it shows a list of available mods, but if you prefer to have a properly formatted name you can create a mod INI file.

The INI filename should be the same filename as your mod, i.e. for a mod called my_mod.zip use the filename my_mod.ini.

The contents of a typical mod INI file looks like this:

[Info]
display_name = "Location Finder"

Just change the name to the name of your mod.

Mod HTML Readme
This is a HTML text file that scrolls up the screen when your mod file is selected. The version of HTML used in the game is limited and supports only basic features such as horizontal rules, and bold and italic text.

The HTML filename should be the same filename as your mod, i.e. for a mod called my_mod.zip use the filename my_mod.html.

 

Scenarios

Scenarios are a special form of mod. You put them together in exactly the same way as normal mods, but scenarios require a Pog package containing the Pog script for the mod. (You can have more than one package, but you must have at least one package.)

The package filename should be the same filename as your mod, i.e. for a mod called my_mod.zip use the package filename of  my_mod.pkg. The package must be in a packages folder in the zip (just as in the resource.zip)

In addition the Scenario package should contain a function called ScenarioMain() This function is called when you select the scenario on the extras screen.

When a scenario is called, the game is still in the front end or GUI. This allows you to make GUI screens that display before your scenario properly starts, for example a ship selection screen, or a high score table. To get the scenario to enter space you will need to use these lines of code:

iGame.SetGameType( IGT_Mod );
iGame.StartNewGame( "map:/geog/badlands/hoffers_wake", "challenge_course" );

The first line specifies that a MOD game type is running.

The second specifies the starting map to use for the mod, and the package to use. The game will then call the function Main() in your scenario package when the space screen has loaded. Just replace the example map and package with the map and package required for your own mod.

Distributing Mods

You are free to distribute your mod in accordance with the Mods License ageement.